﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        let arr = [1, 2, 3, 4, 5, 6, 6];
        let arr1 = [];
        for (var i = 0; i < arr.length; i++) {
            let flag = false;
            for (var j in a) {
                if (arr[i]==arr[j]) {
                    flag = true;
                }
            }
            if (!flag) {
                arr1[arr1.length] = arr[i];
            }
        }
        console.log(arr1);
    </script>
</body>
</html>